import java.util.*;


public class Main {
    /**
     * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
     *
     * @param numbers int整型一维数组
     * @return int整型
     */
        public int MoreThanHalfNum_Solution(int[] numbers) {
            // write code here
            // write code here
            Scanner sc = new Scanner(System.in);
            int n = sc.nextInt();
            int[] count = new int[10];
            for (int i = 0; i < n; i++) {
                numbers[i] = sc.nextInt();
            }
            for (int j = 0; j < n; j++) {
                count[numbers[j]]++;
            }
            for (int k = 0; k < count.length; k++) {
                if (count[k] > n / 2) {
                    return count[k];
                }
            }
            return 0;
        }
    }

